﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace WindowsFormsApplication3.Transaction
{
    
    class Quotationtransaction
    {
       

        public DataTable getquotationdatabypk(int quotationpk)
        {

            OleDbConnection oleDbConnection1 = new System.Data.OleDb.OleDbConnection(Program.ConnStr);
            oleDbConnection1.Open();
            OleDbCommand oleDbCommand1 = new System.Data.OleDb.OleDbCommand("SELECT quotationmastertable.quotationcode, quotationmastertable.sillabordercharges, quotationmastertable.battabordercharges, quotationmastertable.driverpayment, quotationmastertable.rent, quotationmastertable.extra, quotationmastertable.total, quotationmastertable.discount, quotationmastertable.remark, quotationmastertable.amount, quotationmastertable.isconfirmed, jobcodemastertable.jobcode, jobcodemastertable.jobpk, jobcodemastertable.companyName, jobcodemastertable.customercode, jobcodemastertable.noofpackage, jobcodemastertable.destination, jobcodemastertable.packagetype, jobcodemastertable.description, jobcodemastertable.fromPlace, jobcodemastertable.totaltrip, jobcodemastertable.customercode FROM jobcodemastertable INNER JOIN quotationmastertable ON jobcodemastertable.jobpk=quotationmastertable.jobpk WHERE (((quotationmastertable.quotationpk)=@qtnpk))", oleDbConnection1);
            oleDbCommand1.Parameters.AddWithValue("@qtnpk", quotationpk);
            OleDbDataReader myreader = oleDbCommand1.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(myreader);


            oleDbConnection1.Close();


            return dt;
        }
    
    
    
    
    
    
    
    
    
    
    
    
    
    }
    
}
